﻿Imports SdlDotNet.Graphics
Imports System.Drawing

Public Class CityCollection
    Public cities(4) As City

    Public Sub Draw(ByRef display As Surface)
        For Each city As City In cities
            city.Draw(display)
        Next
    End Sub

    Public Function AllCitiesDestroyed() As Boolean
        Dim allDestroyed As Boolean = True

        For Each city As City In cities
            If (city.Health > 0) Then
                allDestroyed = False
                Exit For
            End If
        Next

        Return allDestroyed
    End Function

    Public Function RandomCity() As City
        Return cities(RandomNumberProvider.GetRandomNumber(0, 4))
    End Function
End Class
